<#import "/common/function.ftl" as fn>
<@fn.header _title="">
<script language="javascript" type="text/javascript" src="${base}/web/js/My97DatePicker/WdatePicker.js"></script>
<script language="javascript" type="text/javascript">
    function showDiv(id) {
        $("li[id^='li']").removeAttr("class");
        $("#li"+id).attr("class", "visited");
        $("div[id^='div_']").hide();
        $("#div_"+id).show();
    }
    
    function getDiv() {
	    var search = location.href;
	    var arr = search.split("#");
	    if(arr.length > 1){
	    	return arr[1];
	    }else{
	    	return -1;
	    }
	}
	
$(document).ready(function(){
		if(getDiv() != -1){
		alert("3");
			showDiv(getDiv());
		}
		//表单提交
	var options = {
        beforeSubmit:validate,
        success:showResponse,
        dataType:'json'
    }; 
    
    $('#mainForm').submit(function() {
        $(this).ajaxSubmit(options);
        return false;
    });		
		
});
	
function validate(formData, jqForm, options) {
    for (var i=0; i < formData.length; i++) { 
        if (!formData[i].value) { 
            alert('请将表单信息填写完整！'); 
            return false; 
        }
    }
    return true; 
}

function showResponse(responseText, statusText, xhr, $form)  {
//	alert("showResponse");
    if(responseText['status'] == "1"){
    	alert("保存成功！请处理其他申请！");
    	redirect();
    }else{
    	alert("数据保存失败！");
    }
}

function redirect(){
//	parent.selectTab(4);
	window.location.href="${base}/admissionverify/index";
}	
	
	
	
</script>
</@fn.header>
<body>
<div class="rightBk">
	<@fn.position _value="准入标准审核" /> 
    <!-- 选项卡 -->
    <div style="margin:0px 0;height:30px">
        <ul class="tab">
        <#list 0..(fm?size -1) as i>
            <li id="li${i}" class="visited"><a href="javascript:void(0)" onclick="showDiv('${i}')">${(fm[i].name)!}</a></li>
        </#list>
            <li id="li${fm?size}"><a href="javascript:void(0)" onclick="showDiv('${fm?size}')">准入标准审核意见</a></li>
        </ul>
    </div>
    
    <#list 0..(fm?size -1) as i>
	<div id="div_${i}"<#if (i>0)> style="display:none;"</#if>>
		<form action="${base}/admissionverify/sendCheck" method="POST" id="form${i}" onsubmit="return Validator.Validate(this)">
			<input type="hidden" name="id" value="${(fm[i].id)!}" />
			<input type="hidden" name="ctId" value="${(checkTotal.id)!}" />
		    <!-- title -->
		    <div class="title">
		        <div class="title-middle">
		            <div class="title-left">
		            </div>
		            <div class="title-caption">
		                准入标准审核</div>
		            <div class="title-right">
		            </div>
		        </div>
		    </div>
		    <!-- table -->
	        <table class="table1">
	            <colgroup>
	                <col class="GridCaption" style="width: 20%; background-color: #eef3f7;" />
	                <col class="GridCaption" style="width: 20%; background-color: #eef3f7;" />
	                <col class="GridCaption" style="width: 20%; background-color: #eef3f7;" />
	                <col class="GridCaption" style="width: 20%; background-color: #eef3f7;" />
	                <col class="GridCaption" style="width: 20%; background-color: #eef3f7;" />
	            </colgroup>
	            <tr style="font-weight: bold;">
	                <td rowspan="2" class="alignCenter">
	                    基本信息办
	                </td>
	                <td rowspan="2" class="alignCenter">
	                    申报值
	                </td>
	                <td class="alignCenter" colspan="2">
	                    委办返回
	                </td>
	                <td class="alignCenter" rowspan="2">
	                    核定值
	                </td>
	            </tr>
	            <tr>
	                <td class="alignCenter">
	                    民政
	                </td>
	                <td class="alignCenter">
	                    公安
	                </td>
	            </tr>
	            <tr>
	                <td>
	                    证件类型
	                </td>
	                <td>${(fm[i].idTypeAlias)!}</td>
	                <td>${(mz[i].idTypeAlias)!}</td>
	                <td>${(ga[i].idTypeAlias)!}</td>
	                <td>
	                    <select class="select1" name="idType" require="true" dataType="Require" msg="填写不正确">
	                        <option selected="selected" value="">请选择</option>
	                        <option value="01">身份证</option>
	                        <option value="02">护照</option>
	                        <option value="03">居住证</option>
	                        <option value="04">军官证</option>
	                        <option value="05">出生证</option>
	                        <option value="06">绿卡</option>
	                        <option value="07">港澳通行证</option>
	                        <option value="08">其他证件</option>
	                    </select>
	                </td>
	            </tr>
	            <tr>
	                <td>
	                    证件号码
	                </td>
	                <td>${(fm[i].idNumber)!}</td>
	                <td>${(mz[i].idNumber)!}</td>
	                <td>${(ga[i].idNumber)!}</td>
	                <td>
	                    <input type="text" class="input4" name="idNumber" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" />
	                </td>
	            </tr>
	            <tr>
	                <td>
	                    姓名
	                </td>
	                <td>${(fm[i].name)!}</td>
	                <td>${(mz[i].name)!}</td>
	                <td>${(ga[i].name)!}</td>
	                <td>
	                    <input type="text" class="input4" name="name" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" />
	                </td>
	                </tr>
	                <tr>
	                    <td>
	                        性别
	                    </td>
	                <td>${(fm[i].gender)!}</td>
	                <td>${(mz[i].gender)!}</td>
	                <td>${(ga[i].gender)!}</td>
	                <td>
	                    <select class="input6" name="gender">
	                        <option value="1">男</option>
	                        <option value="0">女</option>
	                    </select>
	                </td>
	            </tr>
	            <tr>
	                <td>
	                    婚姻状况
	                </td>
	                <td>${(fm[i].maritalStatusAlias)!}</td>
	                <td>${(mz[i].maritalStatusAlias)!}</td>
	                <td>${(ga[i].maritalStatusAlias)!}</td>
	                <td>
	                    <select class="select1" name="maritalStatus" require="true" dataType="Require" msg="填写不正确">
	                        <option selected="selected" value="">请选择</option>
	                        <option value="01">已婚</option>
	                        <option value="02">未婚</option>
	                        <option value="03">离婚</option>
	                        <option value="04">丧偶</option>
	                    </select>
	                </td>
	            </tr>
	            <tr>
	                <td>
	                    文化程度
	                </td>
	                <td>${(fm[i].educationAlias)!}</td>
	                <td>${(mz[i].educationAlias)!}</td>
	                <td>${(ga[i].educationAlias)!}</td>
	                <td>
	                    <select class="select1" name="education" require="true" dataType="Require" msg="填写不正确">
	                        <option selected="selected" value="">请选择</option>
	                        <option value="01">大学</option>
	                        <option value="02">大专</option>
	                        <option value="03">高中</option>
	                        <option value="06">研究生</option>
	                        <option value="07">博士</option>
	                    </select>
	                </td>
	            </tr>
	            <tr>
	                <td>
	                    出生日期
	                </td>
	                <td>${(fm[i].birthday)!}</td>
	                <td>${(mz[i].birthday)!}</td>
	                <td>${(ga[i].birthday)!}</td>
	                <td>
	                    <input type="text" class="input4" onclick="WdatePicker()" name="birthday" require="true" dataType="Require" msg="填写不正确" readonly="readonly" />
	                </td>
	            </tr>
	            <tr>
	                <td>
	                    入市户籍年月
	                </td>
	                <td>${(fm[i].settleTime)!}</td>
	                <td>${(mz[i].settleTime)!}</td>
	                <td>${(ga[i].settleTime)!}</td>
	                <td>
	                    <input type="text" class="input4" onclick="WdatePicker()" name="settleTime" require="true" dataType="Require" msg="填写不正确" readonly="readonly" />
	                </td>
	            </tr>
	            <tr>
	                <td>
	                    入申请区户籍年月
	                </td>
	                <td>${(fm[i].settleCountyTime)!}</td>
	                <td>${(mz[i].settleCountyTime)!}</td>
	                <td>${(ga[i].settleCountyTime)!}</td>
	                <td>
	                    <input type="text" class="input4" onclick="WdatePicker()" name="settleCountyTime" require="true" dataType="Require" msg="填写不正确" readonly="readonly" />
	                </td>
	            </tr>
	            <tr>
	                <td>当前工作单位</td>
	                <td>${(fm[i].workUnit)!}</td>
	                <td>${(mz[i].workUnit)!}</td>
	                <td>${(ga[i].workUnit)!}</td>
	                <td><input type="text" class="input4" name="workUnit" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" /></td>
	            </tr>
	            <#if (i==0)>
	            <tr>
	                <td>房产证编号</td>
	                <td>${(fm[i].houseNumber)!}</td>
	                <td>${(mz[i].houseNumber)!}</td>
	                <td>${(ga[i].houseNumber)!}</td>
	                <td><input type="text" class="input4" name="houseNumber" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" /></td>
	            </tr>
	            <tr>
	                <td>房屋坐落地址</td>
	                <td>${(fm[i].houseAddress)!}</td>
	                <td>${(mz[i].houseAddress)!}</td>
	                <td>${(ga[i].houseAddress)!}</td>
	                <td><input type="text" class="input4" name="houseAddress" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" /></td>
	            </tr>
	            <tr>
	                <td>房屋类型</td>
	                <td>${(fm[i].houseType)!}</td>
	                <td>${(mz[i].houseType)!}</td>
	                <td>${(ga[i].houseType)!}</td>
	                <td><input type="text" class="input4" name="houseType" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" /></td>
	            </tr>
	            <tr>
	                <td>房屋产权类型</td>
	                <td>${(fm[i].housePropertyType)!}</td>
	                <td>${(mz[i].housePropertyType)!}</td>
	                <td>${(ga[i].housePropertyType)!}</td>
	                <td><input type="text" class="input4" name="housePropertyType" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" /></td>
	            </tr>
	            <tr>
	                <td>房屋建筑面积</td>
	                <td>${(fm[i].houseBuildArea)!}</td>
	                <td>${(mz[i].houseBuildArea)!}</td>
	                <td>${(ga[i].houseBuildArea)!}</td>
	                <td><input type="text" class="input4" name="houseBuildArea" require="true" dataType="Number" msg="填写不正确" /></td>
	            </tr>
	            <tr>
	                <td>是否居住类房产</td>
	                <td>${(fm[i].livingHouse)!}</td>
	                <td>${(mz[i].livingHouse)!}</td>
	                <td>${(ga[i].livingHouse)!}</td>
	                <td><input type="text" class="input4" name="livingHouse" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" /></td>
	            </tr>
	            <tr>
	                <td>房屋权利人/共有人</td>
	                <td>${(fm[i].houseSharePeople)!}</td>
	                <td>${(mz[i].houseSharePeople)!}</td>
	                <td>${(ga[i].houseSharePeople)!}</td>
	                <td><input type="text" class="input4" name="houseSharePeople" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" /></td>
	            </tr>
	            <tr>
	                <td>车辆品牌</td>
	                <td>${(fm[i].carBrand)!}</td>
	                <td>${(mz[i].carBrand)!}</td>
	                <td>${(ga[i].carBrand)!}</td>
	                <td><input type="text" class="input4" name="carBrand" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" /></td>
	            </tr>
	            <tr>
	                <td>车牌号码</td>
	                <td>${(fm[i].carNumber)!}</td>
	                <td>${(mz[i].carNumber)!}</td>
	                <td>${(ga[i].carNumber)!}</td>
	                <td><input type="text" class="input4" name="carNumber" require="true" dataType="Limit" min="7" max="7" msg="长度为7" /></td>
	            </tr>
	            <tr>
	                <td>车辆现值</td>
	                <td>${(fm[i].carPresentValue)!}</td>
	                <td>${(mz[i].carPresentValue)!}</td>
	                <td>${(ga[i].carPresentValue)!}</td>
	                <td><input type="text" class="input4" name="carPresentValue" require="true" dataType="Number" msg="填写不正确" /></td>
	            </tr>
	            </#if>
	        </table>
		
		    <div class="title marginTop15">
		        <div class="title-middle">
		            <div class="title-left">
		            </div>
		            <div class="title-caption">
		                受理信息</div>
		            <div class="title-right">
		            </div>
		        </div>
		    </div>
		    <!-- table -->
		    <table class="table1">
		        <colgroup>
		            <col class="GridCaption" style="width: 12%; background-color: #eef3f7;" />
		            <col style="width: 250px;" />
		            <col class="GridCaption" style="width: 12%; background-color: #eef3f7;" />
		            <col />
		        </colgroup>
		        <tr>
		            <td>
		                受理机构
		            </td>
		            <td>
		                <select name="ddlCertType2" id="Select5" class="select1">
		                    <option selected="selected" value="01">XX街镇服务中心</option>
		                </select>
		            </td>
		            <td>
		                受理时间
		            </td>
		            <td>
		                &nbsp;<input name="txtReciveDate1" type="text" id="Text2" class="input4" onclick="WdatePicker()" require="true" dataType="Require" msg="填写不正确" readonly="readonly" />
		            </td>
		        </tr>
		        <tr>
		            <td>
		                受理人
		            </td>
		            <td>
		                <input name="txtCertCodeJSF0" type="text" id="Text9" class="input4" value="${handleUser!}" require="true" dataType="Limit" min="1" max="50" msg="长度为1~50" />
		            </td>
		            <td>
		                备注
		            </td>
		            <td>
		                <input name="txtCertCodeJSF" type="text" id="Text3" class="input4" />
		                <span class="star">*</span>
		            </td>
		        </tr>
		    </table>
		    <!-- button -->
		    <div class="marginTop15 alignCenter">
		        <input type="image" src="${base}/web/img/btnSubmit.gif" border="0" />
		     </div>
		</form>
	</div>
	</#list>
	
	<div id="div_${fm?size}" style="display:none;">
	        <!-- title -->        
	        <div class="title">
	            <div class="title-middle">
	                <div class="title-left"></div>
	                <div class="title-caption">业务审核记录</div>
	                <div class="title-right"></div>
	            </div>
	        </div>
	        
	        <!-- table -->
	        <table class="tableCenter">
	            <tr>
	                <th width="5%">序号</th>
	                <th width="8%">申请人代表</th>
	                <th width="10%">审核节点</th>
	                <th width="8%">审核结果</th>
	                <th width="12%">经办人</th>
	                <th width="28%">审核意见</th>
	            </tr>
	            <tr>
	                <td>1</td>
	                <td>${(fm[0].name)!}</td>
	                <td>委托核对</td>
	                <td>受理委托</td>
	                <td>${(user.name)!}</td>
	                <td>申请材料完整，发送街镇核实</td>
	            </tr>
	            </table>
	            <br />
	        <!-- title -->        
	        <div class="title marginTop15">
	            <div class="title-middle">
	                <div class="title-left"></div>
	                <div class="title-caption">核对家庭成员信息概要</div>
	                <div class="title-right"></div>
	            </div>
	        </div>

	        <!-- table -->
	        <table class="tableCenter">
	            <tr>
	                <th width="5%">序号</th>
	                <th width="8%">姓名</th>
	                <th width="30%">证件号</th>
	                <th width="15%">与申请人代表关系</th>
	                <th width="12%">可支配收入申报</th>
	                <th width="8%">财产申报</th>
	            </tr>
	            <#assign i=1>
	            <#list fm as _data>
	            <tr>
	                <td>${i}</td>
	                <td>${(_data.name)!}</td>
	                <td>${(_data.idNumber)!}</td>
	                <td><#if _data.mainApplicant>本人<#else>${(_data.relationMainApplicant)!}</#if></td>
	                <td>${(_data.isReportDPI)!}</td>
	                <td>${(_data.isReportProperty)!}</td>
	            </tr>
	            <#assign i=i+1>
				</#list>
	        </table>
			<br />
			
		 <form action="${base}/admissionverify/sendCheck" method="POST" id="mainForm">		
	        <!-- title -->
	        <div class="title marginTop15">
	            <div class="title-middle">
	                <div class="title-left"></div>
	                <div class="title-caption">核实意见</div>
	                <div class="title-right"></div>
	            </div>
	        </div>
	        
	        <!-- table -->
	        <table class="table2">
	            <tr>
	                <td>
	                    <input id="Radio1" checked="checked" name="verifyReason" type="radio" value="CHECK_PASS" />通过准入标准审核
	                    <input id="Radio2" name="verifyReason" type="radio" value="EXIST_DIFFERENCE"/>中止核对</td>
	            </tr>
	            <tr>
	                <td>
	                    <input type="text" name="verifyopinion" class="input7" value="基本信息已核实"/>
	                </td>
	            </tr>
	        </table>
	        <input type="hidden" name="taskId" value="${taskId?c}" />
        	<input type="hidden" name="checkTotalId" value="${checkTotalId}" />
	        <!-- button -->
			<div class="alignCenter marginTop15">
				<input type="image" src="${base}/web/img/btnSave.gif" border="0" />
			</div>
		</form>
	</div>
</div>
</body>
</html>